﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;

namespace BigData.DataContracts.Objects.BigData
{
    /// <summary>
    /// Represents a connection between a BigDataUser and a Registered Collection
    /// </summary>
    public class BigDataUserToRegisteredCollection : BigData.BaseTypes.BigDataDBObject_FiniteLife
    {
        /// <summary>
        /// A foreign key to the associated BigDataUser
        /// </summary>
        public ObjectId BigDataUserId { get; set; }
        /// <summary>
        /// A foreign key to the associated Registered Collection
        /// </summary>
        public ObjectId RegisteredCollectionId { get; set; }
        /// <summary>
        /// The last date where the associated dataProvider's data had been synced to the big data database for the associated BigDataUser
        /// </summary>
        [BsonDateTimeOptions(Kind = DateTimeKind.Utc)]
        public DateTime LastDataSync { get; set; }
    }
}
